package me.kevinwalker.core.handler;

import me.kevinwalker.core.annotation.MongoDB;
import me.kevinwalker.core.utils.AnnotationClassUtil;

import java.util.List;

/**
 * 注解解析处理程序
 */
public class AnnotationClassHandler {
    private final String packageName;

    public AnnotationClassHandler(String packageName) {
        this.packageName = packageName;
    }

    public List<Class<?>> getMongDBAnnotationClassList() {
        List<Class<?>> classes = AnnotationClassUtil.getClasses(this.packageName);
        return AnnotationClassUtil.getClassesImplementingInterface(classes, MongoDB.class);
    }
}
